<%@ page import="java.util.List" %>
<%@ page import="com.situ.web.entity.Banji" %><%--
  Created by IntelliJ IDEA.
  User: Gao
  Date: 2021/8/11
  Time: 15:06
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
    <%
       List<Banji> list = (List<Banji>) request.getAttribute("banjiList");
    %>
    <form action="<%=request.getContextPath()%>/student?method=insert" method="post">
        名字:<input type="text" name="name"/><br/>
        年龄:<input type="text" name="age"/><br/>
        性别:<input type="text" name="gender"/><br/>
        班级: <select name="banjiId">
                <%
                    for(Banji banji : list) {
                %>
                         <option value="<%=banji.getId()%>"><%=banji.getName()%></option>
                <%
                    }
                %>
             </select>
         <br/>
        <input type="submit" value="添加"/>
    </form>
</body>
</html>
